{dede:config.pagesize value='30'/}
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
		<title>广告管理</title>
		<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
		<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="/static/web/css/admin.css">
	</head>
	<body>
		<form name="form3" action="ad_main.php" method="get" id="form3">
			<input type="hidden" name="dopost" value="listArchives">
			<table class="table shadow-sm my-3">
				<tr>
					<td>
						<input type="text" name="keyword" placeholder="请输入关键词" class="admin-input-lg mr-3">
						<select name="clsid" id="clsid" class="admin-input-sm">
							<option value="0">默认分类</option>
							<?php echo $option;?>
						</select>
						<button type="submit" name="submit" class="btn btn-success btn-sm">搜索</button>
						<a href="ad_add.php" class="btn btn-success btn-sm">添加广告</a>
						<a href="adtype_main.php" class="btn btn-success btn-sm">广告分类管理</a>
					</td>
				</tr>
			</table>
		</form>
		<table class="table shadow-sm mb-3">
			<tr>
				<td colspan="7">广告管理</td>
			</tr>
			<tr align="center">
				<td width="6%">id</td>
				<td width="20%">分类</td>
				<td width="20%">广告名称</td>
				<td width="12%">投放范围</td>
				<td width="11%">是否限时</td>
				<td width="11%">结束时间</td>
				<td>操作</td>
			</tr>
			{dede:datalist empty='<tr><td colspan="7" align="center">暂无记录</td></tr>'}
			<tr align="center">
				<td>{dede:field.aid/}</td>
				<td>{dede:field.clsname function='TestType(@me,1)'/}</td>
				<td>{dede:field.adname/}</td>
				<td>{dede:field.typename function='TestType(@me)'/}</td>
				<td>{dede:field.timeset function='TimeSetValue(@me)'/}</td>
				<td>{dede:field.endtime function='GetDateMk(@me)'/}</td>
				<td>
					<a href="ad_edit.php?aid={dede:field.aid/}&dopost=edit" class="btn btn-light btn-sm"><i class="fa fa-pencil-square"></i> 修改</a>
					<a href="ad_edit.php?aid={dede:field.aid/}&dopost=gettag" class="btn btn-light btn-sm"><i class="fa fa-code"></i> 代码</a>
					<a href="ad_edit.php?aid={dede:field.aid/}&dopost=delete" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i> 删除</a>
				</td>
			</tr>
			{/dede:datalist}
			<tr>
				<td colspan="7" align="center">{dede:pagelist listsize='6'/}</td>
			</tr>
		</table>
	</body>
</html>